package StructuralPattern.Facade;

public class EncryptFacade {
    private FileReader fileReader;
    private FileWriter fileWriter;
    private CipherMachine cipherMachine;

    public EncryptFacade() {
        fileReader = new FileReader();
        cipherMachine = new CipherMachine();
        fileWriter = new FileWriter();
    }

    public void fileEncrypt(String filenameStr, String fileNameDes) {
        String plainStr = fileReader.read(filenameStr);
        String s = cipherMachine.encrypt(plainStr);
        fileWriter.write(s,fileNameDes);
    }
}
